home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-04-21 | 1.8 KB | 71 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: ValueStream.h
- // Release Version: $ 1.0d1 $
- //
- // Author: Anthone Burbidge
- // Creation Date: 3/28/94
- //
- // Copyright: © 1993, 1994 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef _VALUESTREAM_
- #define _VALUESTREAM_
-
- // ----- Textension Includes -----
-
- #ifndef _Streams_
- #include "Streams.h"
- #endif
-
- //========================================================================================
- // Forward class declarations
- //========================================================================================
-
- class XMPStorageUnit;
-
-
- //========================================================================================
- // CLASS CValueStream
- //========================================================================================
-
- class CValueStream : public CStream
- {
- public:
- CValueStream();
-
- void InitValueStream(XMPStorageUnit *su);
- virtual ~CValueStream();
-
- virtual OSErr WriteBytes(const void* theBytes, long bytesCount);
- virtual OSErr ReadBytes(void* theBytes, long bytesCount);
-
- virtual long GetPosition() const;
- virtual void SetPosition(long newPosition);
- virtual void Skip(long count);
-
- virtual long GetSize() const;
-
- virtual OSErr Append(long count);
- // Appends "count" bytes at the end of the stream, position is not changed
-
- virtual void Empty();
-
- virtual OSErr Load(long size, Ptr* data);
- //fPosition is advanced by "size"
-
- virtual void Unload(Ptr data);
- //should be called even if "Load" returns an error
-
- // ----- New API
- public:
- XMPStorageUnit *GetStorageUnit()
- { return fSU; }
-
- private:
- XMPStorageUnit *fSU;
- };
-
- #endif
-